home *** CD-ROM | disk | FTP | other *** search
- ABI(5) Last changed: 1-28-99
-
-
- NNAAMMEE
- AABBII - Application Binary Interface
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- This man page is a quick reference for the three Application Binary
- Interfaces (ABI) that are supported by IRIX.
-
- GGEENNEERRAALL IINNFFOORRMMAATTIIOONN
- An ABI defines a system interface for executing compiled programs. It
- defines which Instruction Set Architectures (ISA) it supports as well
- as defining object file formats and calling conventions.
-
- IRIX supports three ABIs:
-
- oo3322 The old 32-bit ABI which was standard on IRIX 5 systems.
-
- nn6644 The 64-bit ABI which was introduced on IRIX 6.0 systems.
-
- nn3322 The new high performance 32-bit ABI which was introduced on IRIX
- 6.2.
-
- Each of these ABIs defines unique interfaces which make it impossible
- to link object files of one ABI with object files of another ABI.
-
- The MIPS ABI is a subset of the above mentioned oo3322 ABI and is
- designed to provide application portability across a variety of vendor
- platforms. See the NOTES section which follows for reference
- information.
-
- Default ABI and ISA settings described in this man page can be
- overridden by changing the default settings for a given system,
- contained in the //eettcc//ccoommppiilleerr..ddeeffaauullttss file; or by changing the
- SSGGII__AABBII environment variable, which can be used to specify default ABI
- values.
-
- oo3322 IInnffoorrmmaattiioonn
- The oo3322 ABI supports the mmiippss22 ISA (by default) and mmiippss11 ISA. The
- resulting program binary is in ELF32 format (COFF is no longer
- supported) whose symbol table is in ..mmddeebbuugg format. The oo3322 calling
- convention allows a maximum of four registers ($$aa00....$$aa33) to be used to
- pass integer arguments.
-
- When an oo3322 program executes, IRIX sets the FFRR bit in the status
- register of the MIPS microprocessor to 0. Under this setting, only 16
- double precision floating point registers are enabled.
-
- C language integer types (iinntt), long integer types (lloonngg), and pointer
- types (cchhaarr **) are all 32-bits wide in programs compiled for this ABI.
-
- A program is compiled for the oo3322 ABI under the following
- circumstances:
-
- * By default on systems that are not based on the R8000 (if the
- environment variable SSGGII__AABBII is not set), as in this example:
-
- cc foo.c
-
- * By using the --3322 compilation flag; this overrides any SSGGII__AABBII
- setting, as in this example:
-
- cc -32 foo.c
-
- * By using the --mmiippss22 or --mmiippss11 compilation flags, as in this example:
-
- cc -mips2 foo.c
-
- * By setting the SSGGII__AABBII environment variable to --3322 and doing a
- default compilation, as in this example:
-
- setenv SGI_ABI -32
- cc foo.c
-
- * By setting the default ABI to --3322 in the //eettcc//ccoommppiilleerr..ddeeffaauullttss
- file, as in this example:
-
- cat /etc/compiler.defaults
- -DEFAULT:abi=o32
-
- An oo3322 compilation generates certain predefined variables whose values
- can be used by conditional compilation directives. The names of these
- variables and their values are as follows:
-
- _MIPS_FPSET = 16
- _MIPS_ISA = 2
- _ABIO32 = 1
- _MIPS_SIM = _ABIO32
- _MIPS_SZINT = 32
- _MIPS_SZLONG = 32
- _MIPS_SZPTR = 32
-
- For more information about these predefined variables, see the
- <<ssggiiddeeffss..hh>> include file.
-
- nn6644 IInnffoorrmmaattiioonn
- The nn6644 ABI supports the mmiippss44 ISA (by default) and mmiippss33 ISA. The
- resulting program binary is in ELF64 format whose symbol table is in
- DWARF format. The nn6644 calling convention is different from the oo3322
- calling convention in that it allows a maximum of eight registers
- ($$aa00....$$aa77) to be used to pass integer arguments. It also allows a
- maximum of eight floating point registers to be used to pass floating
- point arguments. A full description of this calling convention can be
- found in the _M_I_P_S_p_r_o _6_4-_B_i_t _P_o_r_t_i_n_g _a_n_d _T_r_a_n_s_i_t_i_o_n _G_u_i_d_e.
-
- When an nn6644 program executes, IRIX sets the FFRR bit in the status
- register of the MIPS microprocessor to 1. Under this setting, all 32
- double precision floating point registers are enabled. This improves
- performance, but old assembly code that accesses a double precision
- floating point register as a pair (one even and one odd) of single
- precision floating point registers will not work.
-
- C language integer types (iinntt) are 32 bits wide, while long integer
- types (lloonngg), and pointer types (cchhaarr **) are both 64-bits wide in
- programs compiled for this ABI.
-
- A program is compiled for the nn6644 ABI under the following
- circumstances:
-
- * By default on systems that are based on the R8000 (if the
- environment variable SSGGII__AABBII is not set), as in this example:
-
- cc foo.c
-
- * By using the --6644 compilation flag; this overrides any SSGGII__AABBII
- setting, as in this example:
-
- cc -64 foo.c
-
- * By using the --mmiippss44 or --mmiippss33 compilation flags, as in this example:
-
- cc -mips4 foo.c
-
- * By setting the SSGGII__AABBII environment variable to --6644 and doing a
- default compilation, as in this example:
-
- setenv SGI_ABI -64
- cc foo.c
-
- * By setting the default ABI to --6644 in the //eettcc//ccoommppiilleerr..ddeeffaauullttss
- file, as in this example:
-
- cat /etc/compiler.defaults
- -DEFAULT:abi=64
-
- An nn6644 compilation generates certain predefined variables whose values
- can be used by conditional compilation directives. The names of these
- variables and their values are as follows:
-
- _MIPS_FPSET = 32
- _MIPS_ISA = 4
- _ABI64 = 3
- _MIPS_SIM = _ABI64
- _MIPS_SZINT = 32
- _MIPS_SZLONG = 64
- _MIPS_SZPTR = 64
-
- nn3322 IInnffoorrmmaattiioonn
- The nn3322 ABI supports the mmiippss33 (by default) and mmiippss44 ISA. The
- resulting program binary is in ELF32 format whose symbol table is in
- DWARF format. The nn3322 calling convention is the same as the nn6644
- calling convention. A full description of this calling convention can
- be found in the _M_I_P_S_p_r_o _N_3_2 _A_B_I _H_a_n_d_b_o_o_k.
-
- When an nn3322 program executes, IRIX sets the FFRR bit in the status
- register of the MIPS microprocessor to 1, just as it does for an nn6644
- program. Under this setting, all 32 double precision floating point
- registers are enabled. This has the same performance and
- compatibility implications as with nn6644.
-
- C language integer types (iinntt), long integer types (lloonngg), and pointer
- types (cchhaarr **) are all 32-bits wide in programs compiled for this ABI.
-
- A program is compiled for the nn3322 ABI under the following
- circumstances:
-
- * By using the --nn3322 compilation flag; this overrides any SSGGII__AABBII
- setting, as in this example:
-
- cc -n32 foo.c
-
- * By setting the SSGGII__AABBII environment variable to --nn3322 and doing a
- default compilation, as in this example:
-
- setenv SGI_ABI -n32
- cc foo.c
-
- * By setting the default ABI to --nn3322 in the //eettcc//ccoommppiilleerr..ddeeffaauullttss
- file.
-
- cat /etc/compiler.defaults
- -DEFAULT:abi=n32
-
- An N32 compilation will generate certain predefined variables whose
- values can be used by conditional compilation directives. The names
- of these variables and their values are as follows:
-
- _MIPS_FPSET = 32
- _MIPS_ISA = 4
- _ABI64 = 3
- _MIPS_SIM = _NABI32
- _MIPS_SZINT = 32
- _MIPS_SZLONG = 32
- _MIPS_SZPTR = 32
-
- SSUUMMMMAARRYY TTAABBLLEE
- The table below summarizes the characteristics of the three ABI's.
-
-
- -----------------------------------------------------------------
- Category O32 nn6644 nn3322
- -----------------------------------------------------------------
- Command Line Switch --3322 --6644 --nn3322
- Supported ISA mmiippss11,,22 mmiippss 33,,44 mmiippss 33,,44
- Default ISA mmiippss22 mmiippss44 mmiippss33
- Object file format ELF32 ELF64 ELF32
- Symbol table format DWARF DWARF
- Number of double 16 32 32
- precision floating
- point registers
- sizeof(iinntt) 32 32 32
- sizeof(lloonngg) 32 64 32
- sizeof(cchhaarr **)) 32 64 32
- -----------------------------------------------------------------
-
- SSEEEE AALLSSOO
- The _M_I_P_S_p_r_o _N_3_2 _A_B_I _H_a_n_d_b_o_o_k and the _M_I_P_S_p_r_o _6_4-_B_i_t _P_o_r_t_i_n_g _a_n_d
- _T_r_a_n_s_i_t_i_o_n _G_u_i_d_e provide information about the calling convention as
- well as background on these ABIs.
-
- mmiippss__eexxtt(5)
-
- This man page is available only online.
-